Deprecate and ignore timeout-expand setting
authorWilliam Jon McCann <william.jon.mccann@gmail.com>
Tue, 9 Jul 2013 20:47:59 +0000 (16:47 -0400)
committerWilliam Jon McCann <william.jon.mccann@gmail.com>
Thu, 11 Jul 2013 21:08:15 +0000 (17:08 -0400)
gtk/gtkexpander.c
gtk/gtkplacessidebar.c
gtk/gtksettings.c

index dac07465b2697fad51c7f5d578dde68fe469c8cf..60c82da1f75ac1a61b81c11da771bff7bf2b2e74 100644 (file)
 
 #define DEFAULT_EXPANDER_SIZE 10
 #define DEFAULT_EXPANDER_SPACING 2
+#define TIMEOUT_EXPAND 500
 
 enum
 {
@@ -1144,13 +1145,7 @@ gtk_expander_drag_motion (GtkWidget        *widget,
 
   if (!priv->expanded && !priv->expand_timer)
     {
-      GtkSettings *settings;
-      guint timeout;
-
-      settings = gtk_widget_get_settings (widget);
-      g_object_get (settings, "gtk-timeout-expand", &timeout, NULL);
-
-      priv->expand_timer = gdk_threads_add_timeout (timeout, (GSourceFunc) expand_timeout, expander);
+      priv->expand_timer = gdk_threads_add_timeout (TIMEOUT_EXPAND, (GSourceFunc) expand_timeout, expander);
     }
 
   return TRUE;
index 5b59739cae59d978b7f0dbc2ab3adb9f44efef04..b548682ac30fdd9a299d2ae9e7a3151e5deee503 100644 (file)
 
 #define EJECT_BUTTON_XPAD 6
 #define ICON_CELL_XPAD 6
+#define TIMEOUT_EXPAND 500
 
 #define DO_NOT_COMPILE 0
 
@@ -1470,23 +1471,17 @@ switch_location_timer (gpointer user_data)
 static void
 check_switch_location_timer (GtkPlacesSidebar *sidebar, const char *uri)
 {
-       GtkSettings *settings;
-       guint timeout;
-
        if (g_strcmp0 (uri, sidebar->drop_target_uri) == 0) {
                return;
        }
        remove_switch_location_timer (sidebar);
 
-       settings = gtk_widget_get_settings (GTK_WIDGET (sidebar));
-       g_object_get (settings, "gtk-timeout-expand", &timeout, NULL);
-
        g_free (sidebar->drop_target_uri);
        sidebar->drop_target_uri = NULL;
 
        if (uri != NULL) {
                sidebar->drop_target_uri = g_strdup (uri);
-               sidebar->switch_location_timer = gdk_threads_add_timeout (timeout, switch_location_timer, sidebar);
+               sidebar->switch_location_timer = gdk_threads_add_timeout (TIMEOUT_EXPAND, switch_location_timer, sidebar);
        }
 }
 
index e5d31c4a087c8ff7a6ee53d975b46889d3d375b2..fadb39540b3082e2fa27685b15034e32ec2ad880 100644 (file)
@@ -694,12 +694,17 @@ gtk_settings_class_init (GtkSettingsClass *class)
 
   g_assert (result == PROP_TIMEOUT_REPEAT);
 
+  /**
+   * GtkSettings:gtk-timeout-expand:
+   *
+   * Deprecated: 3.10: This setting is ignored.
+   */
   result = settings_install_property_parser (class,
                                              g_param_spec_int ("gtk-timeout-expand",
                                                                P_("Expand timeout"),
                                                                P_("Expand value for timeouts, when a widget is expanding a new region"),
                                                                0, G_MAXINT, DEFAULT_TIMEOUT_EXPAND,
-                                                               GTK_PARAM_READWRITE),
+                                                               GTK_PARAM_READWRITE | G_PARAM_DEPRECATED),
                                              NULL);
 
   g_assert (result == PROP_TIMEOUT_EXPAND);